package com.eagle.epay.generator;

import org.jasypt.util.text.BasicTextEncryptor;
import org.junit.Test;

public class Encryptor {

	@Test
	 public void getPass() {
	 BasicTextEncryptor textEncryptor = new BasicTextEncryptor();
	 textEncryptor.setPassword("hB0_kA1@eD05eE0`aA0(kB0)cG2+jE");
//	 String url = textEncryptor.encrypt("rdqA36kS9rel3XWl");
//	 System.out.println(url + "----------------");
	 String name = textEncryptor.encrypt("coc_perf");
	// String password = textEncryptor.encrypt("数据库密码");
	//解密内容
//	  url = textEncryptor.decrypt(url);
	 String deName = textEncryptor.decrypt("GwUdeyy14H8MBu2B+HBxNQ==");
	// String password = textEncryptor.decrypt("4EyN0xDLbnP2lsaayjl8fbIctj5bVIdD");


//	 System.out.println(url + "----------------");
	 System.out.println(name + "----------------");
		System.out.println(deName + "----------------");
//	 System.out.println(password + "----------------");
//	 Assert.assertTrue(name.length() > 0);
//	 Assert.assertTrue(password.length() > 0);
	 }
}
